package com.sangmo.fts.basic.model;

import com.sangmo.boot.framework.data.entity.general.LongEntity2;

import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "access_log")
public class AccessLog extends LongEntity2 {

    private String clientIp;
    private String url;
    private String request;
    private String response;
    private String state = States.SUCCESS;
    private long duration;
    private String message;
    private String traceId;

    public String getClientIp() {
        return clientIp;
    }

    public void setClientIp(String clientIp) {
        this.clientIp = clientIp;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getRequest() {
        return request;
    }

    public void setRequest(String request) {
        this.request = request;
    }

    public String getResponse() {
        return response;
    }

    public void setResponse(String response) {
        this.response = response;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public long getDuration() {
        return duration;
    }

    public void setDuration(long duration) {
        this.duration = duration;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getTraceId() {
        return traceId;
    }

    public void setTraceId(String traceId) {
        this.traceId = traceId;
    }

    public interface States {
        String SUCCESS = "SUCCESS";
        String FAIL = "FAIL";
    }
}
